# -*- coding: utf-8 -*-
"""
-------------------------------------------------
Project Name: luffcity study project
File Name: 发送邮件.py
Author: kij
Create Date: 2021/2/6
-------------------------------------------------
"""
import smtplib
from email.mime.text import MIMEText
from email.utils import formataddr


def send_email(address):
	# 邮件内容
	msg = MIMEText('你好', 'html', 'utf-8')
	msg['From'] = formataddr(['张坤', 'kijlee@163.com'])
	msg['To'] = address
	msg['Subject'] = "主题吗"
	# 发送邮件
	server = smtplib.SMTP_SSL("smtp.163.com")
	server.login('kijlee@163.com', 'YSAPVLEJARMSUGGV')
	server.sendmail('kijlee@.163.com', address, msg.as_string())
	server.quit()

send_email('kijlee@sina.com')


import hashlib
m = hashlib.md5()
m.update(b'luffy')
m.update(b'city')
print(m.hexdigest())
m2 = hashlib.md5()
m2.update(b'luffycity')
print(m2.hexdigest())